<?php
class View_Administration_Project_Add extends View_Administration_Project
{
	public function buildContent()
	{
		$request	= CMF_Krypton_Core_Registry::getStatic( 'request' );
		$session	= CMF_Krypton_Core_Registry::getStatic( 'session' );
		$words		= $this->words['project']['addProject'];

		$logic		= new Logic_Project();
		$opt_project	= $logic->getProjects();
		$sources	= array( 'opt_project'	=> $opt_project );

		//  --  UI COMPONENTS  --  //
		$ui	= array(
			'words'		=> $words,
			'form'		=> $this->buildForm(
				'administration/project',
				'addProject',
				'project',
				'addProject',
				array(),
				$sources
			),
			'buttonCancel'		=> $this->html->LinkButton(
				self::getUrl(),
				$words['buttonCancel'],
				'but cancel'
			),
			'buttonAdd'		=> $this->html->Button(
				'addProject',
				$words['buttonAdd'],
				'but add'
			),
			'form.tag'		=> $this->html->Form(
				'addProject',
				self::getUrl( array( 'action' => 'add' ) )
			),
			'caption'	=> $this->html->TableCaption( $words['caption'], 'add' ),
			'colgroup'	=> $this->html->ColumnGroup( $words['colgroup'] ),
		);
		return $this->loadTemplate( 'administration.project.add', $ui );
	}
}
?>